<?php


Class Account_MyDataController Extends Yapary_MVC_Controller
{


    /**
     * Uebergebene PageId ermitteln und validieren
     * */
    public function defaultAction ($GUI)
    {
        $cParameter = new Yapary_Parameter_Parameter();
        // Benutzerdaten
        $this->model->firstName		= $cParameter->getParam(@$_POST['firstName'], NULL, new Yapary_Parameter_ParameterCheckString(1, 50));
        $this->model->lastName		= $cParameter->getParam(@$_POST['lastName'], NULL, new Yapary_Parameter_ParameterCheckString(1, 50));
        $this->model->password		= $cParameter->getParam(@$_POST['password'], NULL, new Yapary_Parameter_ParameterCheckString(1, 30));
        $this->model->password2		= $cParameter->getParam(@$_POST['password2'], NULL, new Yapary_Parameter_ParameterCheckString(1, 30));
        $this->model->email			= $cParameter->getParam(@$_POST['email'], NULL, new Yapary_Parameter_ParameterCheckEmail(50));

        // Kontaktdaten
        $this->model->country		= $cParameter->getParam(@$_POST['country'], NULL, new Yapary_Parameter_ParameterCheckString(2,50));
        $this->model->city			= $cParameter->getParam(@$_POST['city'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));
        $this->model->zip			= $cParameter->getParam(@$_POST['zip'], NULL, new Yapary_Parameter_ParameterCheckNumericLength(4, 5));
        $this->model->street		= $cParameter->getParam(@$_POST['street'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));
        $this->model->phone			= $cParameter->getParam(@$_POST['phone'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));

        $this->model->useBillingAddress	= (isset($_POST['useBillingAddress'])) ? true : false;
		if ($this->model->useBillingAddress == true) {
			$this->model->cssRegisterBillingDialog = 'display:;';
			$this->model->useBillingAddressState = 'checked="checked"';
		}

        // Rechnugnsanschrift
        $this->model->countryBilling	= $cParameter->getParam(@$_POST['countryBilling'], NULL, new Yapary_Parameter_ParameterCheckString(2,50));
        $this->model->cityBilling		= $cParameter->getParam(@$_POST['cityBilling'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));
        $this->model->zipBilling		= $cParameter->getParam(@$_POST['zipBilling'], NULL, new Yapary_Parameter_ParameterCheckNumericLength(4, 5));
        $this->model->streetBilling		= $cParameter->getParam(@$_POST['streetBilling'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));
        $this->model->phoneBilling		= $cParameter->getParam(@$_POST['phoneBilling'], NULL, new Yapary_Parameter_ParameterCheckString(3,50));


        $this->model->send			= isset($_POST['register']) ? true : false; // Button Registrieren angeklickt
    }


}


?>